package com.rainyun.rd.entity;

import com.rainyun.rc.common.ClassVersion;
import com.rainyun.rc.orm.annotation.IgnoreField;
import com.rainyun.rc.orm.annotation.JsonField;
import com.rainyun.rc.orm.annotation.PrimaryField;

import java.util.ArrayList;
import java.util.List;

@ClassVersion("1.0.0")
/**玩家信息实体*/
public class PlayerInfo {

    //玩家名>>主键
    @PrimaryField
    String name;

    //年龄
    int age;

    //爱好:用json格式存数据库
    @JsonField
    List<String> hobbys = new ArrayList<>();

    //性别(不存数据库)
    @IgnoreField
    String sex = "boy";



    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public List<String> getHobbys() {
        return hobbys;
    }
    public void setHobbys(List<String> hobbys) {
        this.hobbys = hobbys;
    }

    @Override
    public String toString() {
        return "PlayerInfo{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", hobbys=" + hobbys +
                ", sex='" + sex + '\'' +
                '}';
    }
}
